<template>
	<div>
		<div id="main"></div>
	</div>
</template>

<script>
	import * as echarts from 'echarts';
	export default {
		name: 'basicBar',
		mounted() {

			var chartDom = document.getElementById('main');
			var myChart = echarts.init(chartDom);
			var option;

			option = {
				xAxis: {
					type: 'category',
					//x轴刻度显示与否
					axisTick: {
						show: false
					},
					data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
				},
				yAxis: {
					type: 'value',
					axisLine: {
						show: true
					},
				},
				series: [{
						data: [120, 200, 150, 80, 70, 110, 130],
						color: '#4992FF',
						stack: 'total',
						type: 'bar'
					},
					{
						data: [120, 200, 150, 80, 70, 110, 130],
						color: '#05C091',
						stack: 'total',
						type: 'bar'
					},
					{
						data: [120, 200, 150, 80, 70, 110, 130],
						color: '#FF955A',
						stack: 'total',
						type: 'bar'
					}
				]
			};

			option && myChart.setOption(option);

		}
	}
</script>

<style>
</style>
